package com.study.web;

import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author study
 * @version 1.0
 * @date 2020/6/27 16:46
 */

@Slf4j
@RestController
@RequestMapping("api")
@Api(tags = "Jsoup测试")
public class JsoupController {
    @GetMapping("param")
    public void param(HttpServletRequest req, String type) {
        System.out.println(req.getParameter("code"));
        System.out.println(req.getParameter("name"));
        System.out.println(type);
        System.out.println(req.getParameter("type"));
    }

    @GetMapping("params")
    public void params(HttpServletRequest req, String type, String passCode) {

        System.out.println(type);
        System.out.println(passCode);
    }

    @GetMapping("bean")
    public void paramBean(Param param) {
        System.out.println(param.toString());


    }
}

